package com.android.stockme.backend;

import java.util.List;

import com.android.stockme.backend.configuration.IConfigurationManager;
import com.android.stockme.backend.news.INewsUpdatesCenter;
import com.android.stockme.backend.portfolio.IStockProtfolio;
import com.android.stockme.backend.util.Tupple;


public interface IBackendController extends Runnable {
	
	public abstract IConfigurationManager getConfigurationManager();
	
	public abstract IStockProtfolio getStockPortfolio();
	
	public abstract INewsUpdatesCenter getNewsUpdatesCenter();
	
	public abstract void startUpdating();
	
	public abstract void stopUpdating();
		
	public abstract void registerNewsTickListener(ITickListener listener);

	public abstract void registerStockTickListener(ITickListener listener);

	public abstract void unregisterNewsTickListener(ITickListener listener);
	
	public abstract void unregisterStockTickListener(ITickListener listener);
	
	/**
	 * Fetch stock history values from the last days
	 * @param symbol -
	 * 			stock's {@code String} symbol
	 * @return returns {@code List< Tupple<String, Float> >} represents
	 * a list of Tupples containing dates and stock values
	 */
	public abstract List<Tupple<String, Float>> fetchStockHistory(String symbol);
}
